package com.copc.common.util;

import com.copc.common.constants.RelationWithApplicantEnum;
import com.copc.common.constants.RelationWithApplicantPicusEnum;

/**
 * 人与人关系转换
 *
 * @author yuni
 * @since 2023/3/9 16:50
 */
public class RelationToApplyPicusUtils {

    public static Integer toChangPicus(String relationWithApplicant) {
        Integer idTypeInt = RelationWithApplicantPicusEnum.QT.value();
        if (RelationWithApplicantEnum.BR.value().equals(relationWithApplicant)
                || RelationWithApplicantEnum.BROR.value().equals(relationWithApplicant)) {
            return RelationWithApplicantPicusEnum.BR.value();
        } else if (RelationWithApplicantEnum.PO.value().equals(relationWithApplicant)) {
            return RelationWithApplicantPicusEnum.PO.value();
        } else if (RelationWithApplicantEnum.FM.value().equals(relationWithApplicant)) {
            return RelationWithApplicantPicusEnum.FM.value();
        } else if (RelationWithApplicantEnum.EN.value().equals(relationWithApplicant)) {
            return RelationWithApplicantPicusEnum.ZN.value();
        }
        return idTypeInt;
    }
}
